<template>
  <el-scrollbar style="height:100%;">
    <div class="container">
      <el-main>
        <!-- <div class="banner-container">
        <div class="banner"></div>
      </div> -->
        <div class="article-content" :class="personInfoClass">
          <div class="article-title">{{articleDetails.title}}</div>
          <ul class="title-details">
            <li>作者 : {{articleDetails.author}}</li>
            <li>发表时间 : {{articleDetails.add_time}}</li>
          </ul>
          <el-card class="box-card">
            <div class="content" v-html="compiledMarkdown"></div>
          </el-card>
          <div class="dianzanBar">
            <div class="prePage-content" @click="goToArticle(preArticle._id)">
              <ul>
                <li>Previous Blog</li>
                <li>{{preArticle.title}}</li>
              </ul>
              <div class="preIcon">
                <i class="iconfont icon-changyongicon-1"></i>
              </div>
              <div class="prePage" :style="{backgroundImage:`url(${preArticle.img_cates})`}"></div>
            </div>
            <div class="dianzan" @click="dianzan">
              <i class="iconfont icon-dianzan" :class="{'isActive':isActiveFlag==true}"></i>
            </div>
            <div class="null_box"></div>
            <div class="nextPage-content" @click="goToArticle(nextArticle._id)">
              <ul>
                <li>Next Blog</li>
                <li>{{nextArticle.title}}</li>
              </ul>
              <div class="nextIcon">
                <i class="iconfont icon-changyongicon-"></i>
              </div>
              <div class="nextPage" :style="{backgroundImage:`url(${nextArticle.img_cates})`}"></div>
            </div>
          </div>
          <div class="statement">
            <ul>
              <li style="overflow-wrap: break-word;">本文链接 : {{url}}</li>
              <li>版权声明 : 本博客的所有文章除特别声明外,均为原创 |未经许可,禁止转载|</li>
            </ul>
          </div>
          <div class="messageBoard">
            <div class="message">
              <i class="iconfont icon-pinglun"></i>
              <span>评论</span>
            </div>
            <!-- 发表评论start -->
            <div class="personMessage">
              <div class="headPortrait">
                <img src="http://localhost:3000/images/hina.png">
              </div>
              <el-form :model="ruleForm" :rules="rules" ref="nameAndEmail" label-width="70px" class="demo-ruleForm">
                <el-form-item label="昵称" prop="name" class="form-item-name">
                  <el-input v-model="ruleForm.name" placeholder="请输入昵称"></el-input>
                </el-form-item>
                <el-form-item label="邮箱" prop="email" class="form-item-email">
                  <el-input v-model="ruleForm.email" placeholder="请输入有效的邮箱地址"></el-input>
                </el-form-item>
              </el-form>
            </div>
            <div class="commentArea">
              <el-form :model="ruleForm" :rules="rules" ref="comment" label-width="100px" class="demo-ruleForm">
                <el-form-item prop="desc">
                  <el-input type="textarea" v-model="ruleForm.desc" placeholder="说点什么吧"></el-input>
                </el-form-item>
              </el-form>
              <div class="submitBtn">
                <el-button type="primary" @click="refreshComment('nameAndEmail','comment')">重置</el-button>
                <el-button type="primary" @click="submitComment">提交</el-button>
              </div>
            </div>
            <!-- 发表评论end -->
            <div class="comments" v-for="(item,index) in articleComments" :key="index">
              <div class="comments_details">
                <div class="portrait">
                  <img src="http://localhost:3000/images/hina.png">
                </div>
                <ul class="userDetails">
                  <li>{{item.nickName}}</li>
                  <li>{{item.content}}</li>
                  <li>{{item.add_time}}<i class="iconfont icon-pinglun" @click="replyBtn(item._id)"
                      style="display:none"></i></li>
                </ul>
              </div>
              <!-- 站长的评论回复 -->
              <div class="myReply" v-for="(item2,index2) in replyComments" :key="index2"
                v-show="item._id === item2.commentId">
                <div class="portrait">
                  <img src="http://localhost:3000/images/portrait.png">
                </div>
                <ul class="userDetails">
                  <li>Kpods</li>
                  <li>{{item2.content}}</li>
                  <li>{{item2.add_time}}</li>
                </ul>
              </div>
              <!-- 回复评论start -->
              <!-- <transition name="fade">
              <div v-show="isExtendReply === true&&commentId===item._id">
                <div class="personMessage">
                  <div class="headPortrait">
                    <img src="http://localhost:3000/images/hina.png">
                  </div>
                  <el-form :model="ruleForm" :rules="rules" ref="nameAndEmail" label-width="70px" class="demo-ruleForm">
                    <el-form-item label="昵称" prop="name" class="form-item-name">
                      <el-input v-model="ruleForm.name" placeholder="请输入昵称"></el-input>
                    </el-form-item>
                    <el-form-item label="邮箱" prop="email" class="form-item-email">
                      <el-input v-model="ruleForm.email" placeholder="请输入有效的邮箱地址"></el-input>
                    </el-form-item>
                  </el-form>
                </div>
                <div class="commentArea">
                  <el-form :model="ruleForm" :rules="rules" ref="comment" label-width="100px" class="demo-ruleForm">
                    <el-form-item prop="desc">
                      <el-input type="textarea" v-model="ruleForm.desc" placeholder="说点什么吧"></el-input>
                    </el-form-item>
                  </el-form>
                  <div class="submitBtn">
                    <el-button type="primary" @click="refreshComment('nameAndEmail','comment')">重置</el-button>
                    <el-button type="primary" @click="submitComment">提交</el-button>
                  </div>
                </div>
              </div>
            </transition> -->
              <!-- 回复评论end -->
            </div>
            <p class="zanwu">暂无更多评论</p>
          </div>
        </div>
        <!-- 回到顶部小火箭 -->

        <transition name="fade">
          <loading v-if="isLoading"></loading>
        </transition>
      </el-main>
      <el-footer>
        <div class="text1">Copyright © {{year}} by Kpods. All Rights Reserved.</div>
        <div class="text2">备案号......</div>
      </el-footer>
    </div>
    <template>
      <el-backtop>
        <div class="huojian">
          <i class="iconfont icon-huojian"></i>
        </div>
      </el-backtop>
    </template>
  </el-scrollbar>

</template>

<script>
import Loading from '../loading/loading.vue'
import marked from 'marked'
export default {
  components: { Loading },
  data() {
    var checkEmail = (rule, value, callback) => {
      const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
      if (!value) {
        return callback(new Error('邮箱不能为空'))
      }
      setTimeout(() => {
        if (mailReg.test(value)) {
          callback()
        } else {
          callback(new Error('请输入正确的邮箱格式'))
        }
      }, 100)
    }
    return {
      articleDetails: {},
      year: new Date().getFullYear(),
      url: window.location.href,
      articleId: this.$route.params.id,
      isActiveFlag: '',
      preArticle: {},
      nextArticle: {},
      allArticles: [],
      // 评论文本框的内容
      comment: null,
      // form表单数据
      ruleForm: {
        name: '',
        email: '',
        desc: ''
      },
      // form表单验证规则
      rules: {
        name: [
          { required: true, message: '请输入昵称', trigger: 'blur' }
        ],
        email: [
          { required: true, message: '请输入邮箱', trigger: 'blur' },
          { validator: checkEmail, trigger: 'blur' }
        ],
        desc: [
          { required: true, message: '请输入想要发表的内容', trigger: 'blur' }
        ]
      },
      // 获取的文章评论数组
      articleComments: [],
      // 是否展开回复栏
      isExtendReply: false,
      // 当前要回复的评论id
      commentId: 0,
      // 当前文章的所有站长回复
      replyComments: [],
      // Loading状态
      isLoading: true,
      // 窗口宽度
      windowWidth: document.documentElement.clientWidth
    }
  },
  // 解析md数据
  computed: {
    compiledMarkdown() {
      return marked(this.articleDetails.content || '', { sanitize: true })
    },
    // 判断屏幕宽度
    personInfoClass() {
      if (this.windowWidth >= 1080) {
        return 'PC_layout'
      } else if (this.windowWidth < 1080 && this.windowWidth >= 812) {
        return 'middle_layout'
      } else {
        return 'mobile_layout'
      }
    }
  },
  watch: {
    // 监听屏幕宽度
    '$store.state.screenWidth': function(val) { // 监听屏幕宽度变化
      this.windowWidth = val
    }
  },
  // 刷新页面时判断文章是否点过赞
  created() {
    const isActive = window.localStorage.getItem(this.articleId)
    if (isActive === '0' || !isActive) {
      this.isActiveFlag = false
    } else {
      this.isActiveFlag = true
    }
    this.getAllArticles(this.articleId)
    this.getArticleComments()
    this.getAllReplyComments()
  },
  mounted() {
    this.getArticleDetails(this.articleId)
  },
  methods: {
    // 获取文章信息
    getArticleDetails(id) {
      this.$http.get(`article/${id}`).then(response => {
        this.articleDetails = response.data
        this.isLoading = false
      })
    },
    // 点赞方法
    dianzan() {
      const isActive = window.localStorage.getItem(this.articleId)
      if (isActive === '0' || !isActive) {
        this.$message({
          showClose: true,
          message: '感谢您的点赞!',
          type: 'success'
        })
        window.localStorage.setItem(this.articleId, 1)
        this.isActiveFlag = true
        this.changeDianZanNum(this.isActiveFlag)
      } else {
        this.$message({
          showClose: true,
          message: '您已经取消点赞!',
          type: 'error'
        })
        window.localStorage.setItem(this.articleId, 0)
        this.isActiveFlag = false
        this.changeDianZanNum(this.isActiveFlag)
      }
    },
    // 点赞数增加或减少
    changeDianZanNum(ActiveFlag) {
      this.$http.put(`dianzan/${this.articleId}`, {
        state: ActiveFlag
      }).then(response => {
      })
    },
    // 获取所有文章的数组
    getAllArticles(id) {
      this.$http.get('article', { params: { inputContent: '' } }).then(response => {
        this.allArticles = response.data
        this.allArticles.reverse()
        this.getPreAndNext(id)
      })
    },
    // 获取本篇文章的上一篇和下一篇
    getPreAndNext(id) {
      const length = this.allArticles.length - 1
      this.allArticles.forEach((item, index) => {
        if (item._id === id) {
          if (index === 0) {
            this.preArticle = this.allArticles[length]
            this.nextArticle = this.allArticles[index + 1]
          } else if (index === length) {
            this.preArticle = this.allArticles[index - 1]
            this.nextArticle = this.allArticles[0]
          } else {
            this.preArticle = this.allArticles[index - 1]
            this.nextArticle = this.allArticles[index + 1]
          }
        }
      })
    },
    // 前往上/下一篇文章
    goToArticle(id) {
      this.$router.push(`/Blog/article/${id}`)
      this.getArticleDetails(id)
      this.getAllArticles(id)
      this.$http.put(`article/${id}`).then(response => {
      })
      this.articleId = this.$route.params.id
      this.getArticleComments()
    },
    // 提交按钮
    submitComment() {
      if (this.ruleForm.name === '' || this.ruleForm.email === '' || this.ruleForm.desc === '') {
        this.$message.error('请填写相关的信息！')
      } else {
        const date = new Date()
        const year = date.getFullYear()
        const month = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
        const day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
        const hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
        const min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
        const second = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
        this.$http.post('comment', {
          nickName: this.ruleForm.name,
          email: this.ruleForm.email,
          content: this.ruleForm.desc,
          add_time: `${year}年${month}月${day}日${hour}:${min}:${second}`,
          articleId: this.articleId,
          articleTitle: this.articleDetails.title,
          commentType: 0,
          children: []
        }).then(response => {
          if (response.status === 200) {
            this.$message({
              type: 'success',
              message: '评论发表成功!'
            })
            this.refreshComment('nameAndEmail', 'comment')
            this.getArticleComments()
          }
        })
      }
    },
    // 重置表单
    refreshComment(formName1, formName2) {
      this.$refs[formName1].resetFields()
      this.$refs[formName2].resetFields()
    },
    // 获取当前文章的评论
    getArticleComments() {
      this.$http.get(`articleComment/${this.articleId}`).then(response => {
        this.articleComments = response.data
        this.articleComments.reverse()
      })
    },
    // 展开回复按钮
    replyBtn(id) {
      this.isExtendReply = !this.isExtendReply
      this.commentId = id
    },
    // 获取当前文章的所有站长回复
    getAllReplyComments() {
      this.$http.get(`replyComment/${this.articleId}`).then(response => {
        this.replyComments = response.data
      })
    }
  }
}
</script>

<style lang="less" scoped>
/deep/.el-scrollbar__wrap {
  overflow-x: hidden;
}
/deep/.el-scrollbar__view {
  height: 100%;
}
.container {
  height: 100%;
  .el-main {
    padding: 0;
    min-height: 92%;
    background-image: linear-gradient(
      to right,
      rgba(254, 172, 94, 0.6),
      rgba(75, 192, 200, 0.6)
    );
    // .banner-container {
    //   overflow: hidden;
    //   width: 100%;
    //   .banner {
    //     margin-top: 60px;
    //     height: 524px;
    //     background-image: url("./fm-01-banner.png");
    //   }
    // }
    .article-content {
      padding: 35px 250px;
      margin-top: 60px;
      .article-title {
        line-height: 50px;
        font-size: 28px;
        text-align: center;
        letter-spacing: 3px;
        color: #333;
      }
      .title-details {
        text-align: center;
        line-height: 26px;
        color: #333;
      }
      .box-card {
        line-height: 26px;
        margin-top: 10px;
        .content {
          /deep/ p {
            font-size: 16px;
            font-weight: normal;
            margin-top: 16px;
            margin-bottom: 16px;
            color: #333;
            img {
              width: 100%;
            }
          }
        }
      }
      .dianzanBar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 20px;
        .prePage-content {
          position: relative;
          overflow: hidden;
          cursor: pointer;
          &:hover .preIcon {
            right: 20px;
          }
          ul {
            position: absolute;
            z-index: 99;
            margin-left: 20px;
            top: 50%;
            transform: translateY(-50%);
            li {
              margin: 10px 0;
              color: #fff;
              font-weight: 300;
              letter-spacing: 1px;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
              width: 170px;
            }
          }
          .preIcon {
            position: absolute;
            z-index: 99;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            text-align: center;
            line-height: 50px;
            right: -50px;
            top: 50%;
            transform: translateY(-50%);
            transition: right 0.5s cubic-bezier(0, 0.6, 0.6, 0.99);
            i {
              font-size: 50px;
              color: #fff;
            }
          }
          .prePage {
            width: 250px;
            height: 100px;
            background-color: #fff;
            background-image: url("http://localhost:3000/images/fm-02-cate.png");
            background-size: 100% 100%;
            filter: blur(3px) brightness(0.75);
            transform: scale(1.1);
          }
        }
        .dianzan {
          margin: 0 auto;
          text-align: center;
          width: 60px;
          height: 60px;
          line-height: 60px;
          background-color: #fff;
          border-radius: 50%;
          cursor: pointer;
          i {
            font-size: 22px;
            color: #666;
          }
          .isActive {
            color: #48c2ff;
          }
        }
        .nextPage-content {
          position: relative;
          overflow: hidden;
          cursor: pointer;
          &:hover .nextIcon {
            left: 20px;
          }
          ul {
            position: absolute;
            z-index: 99;
            // margin-left: 100px;
            top: 50%;
            transform: translateY(-50%);
            text-align: right;
            width: 180px;
            margin-left: 70px;
            li {
              margin: 10px 0;
              color: #fff;
              font-weight: 300;
              letter-spacing: 1px;
              padding-right: 20px;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
            }
          }
          .nextIcon {
            position: absolute;
            z-index: 99;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            text-align: center;
            line-height: 50px;
            left: -50px;
            top: 50%;
            transform: translateY(-50%);
            transition: left 0.5s cubic-bezier(0, 0.6, 0.6, 0.99);
            i {
              font-size: 50px;
              color: #fff;
            }
          }
          .nextPage {
            width: 250px;
            height: 100px;
            background-image: url("http://localhost:3000/images/fm-03-cate.png");
            background-size: 100% 100%;
            filter: blur(3px) brightness(0.75);
            transform: scale(1.1);
          }
        }
      }
      .statement {
        box-sizing: border-box;
        width: 100%;
        height: 100px;
        margin-top: 30px;
        background-color: #24283b;
        padding: 10px 20px;
        color: #fff;
        border-left: #ff1601da 5px solid;
        ul {
          display: flex;
          height: 100%;
          flex-direction: column;
          justify-content: space-around;
          li {
            font-weight: 200;
            font-size: 16px;
            letter-spacing: 1px;
          }
        }
      }
      .messageBoard {
        box-sizing: border-box;
        width: 100%;
        background-color: #fff;
        margin-top: 30px;
        border-radius: 3px;
        box-shadow: 0 0 8px rgba(100, 100, 100, 0.12);
        padding: 15px;
        .message {
          color: #666;
          i {
            font-size: 25px;
            margin-right: 3px;
          }
          span {
            font-size: 20px;
            vertical-align: top;
          }
        }
        .personMessage {
          display: flex;
          margin-top: 30px;
          padding-left: 70px;
          position: relative;
          .headPortrait {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            overflow: hidden;
            position: absolute;
            img {
              width: 100%;
              height: 100%;
            }
          }
          .demo-ruleForm {
            display: flex;
            padding-top: 8px;
            flex-wrap: wrap;
            margin-left: 50px;
            // .form-item-name {
            //   // width: 400px;
            // }
            // .form-item-email {
            //   // width: 400px;
            // }
          }
        }
        .commentArea {
          padding: 0 60px;
          /deep/.el-form-item__content {
            margin-top: 20px;
            margin-left: 0px !important;
            textarea {
              height: 125px;
            }
          }
          .submitBtn {
            width: 100%;
            overflow: hidden;
            padding-bottom: 40px;
            border-bottom: 1px solid rgba(153, 153, 153, 0.5);
            // height: 100px;
            .el-button {
              float: right;
              margin-left: 20px;
            }
          }
        }
        .comments {
          // border-top: 1px solid rgba(153, 153, 153, 0.5);
          padding: 0 20px;
          width: 85%;
          margin: 0 auto;
          margin-top: 30px;
          .comments_details {
            width: 100%;
            margin-top: 20px;
            margin-bottom: 15px;
            display: flex;
            padding-bottom: 5px;
            border-bottom: 1px solid rgba(153, 153, 153, 0.5);
            position: relative;
            .portrait {
              width: 50px;
              height: 50px;
              border-radius: 50%;
              overflow: hidden;
              position: absolute;
              img {
                width: 100%;
                height: 100%;
              }
            }
            .userDetails {
              width: 100%;
              margin-top: 15px;
              margin-left: 60px;
              color: #666;
              li:nth-child(1) {
                font-size: 14px;
              }
              li:nth-child(2) {
                margin-top: 10px;
                color: #333;
              }
              li:nth-child(3) {
                margin-top: 10px;
                font-size: 12px;
                width: 100%;
                i {
                  float: right;
                  cursor: pointer;
                }
              }
            }
          }
          .myReply {
            width: 90%;
            margin: 20px 0px 15px 60px;
            display: flex;
            padding-bottom: 5px;
            border-bottom: 1px solid rgba(153, 153, 153, 0.5);
            position: relative;
            .portrait {
              width: 50px;
              height: 50px;
              border-radius: 50%;
              overflow: hidden;
              position: absolute;
              img {
                width: 100%;
                height: 100%;
              }
            }
            .userDetails {
              width: 100%;
              margin-top: 15px;
              margin-left: 60px;
              color: #666;
              li:nth-child(1) {
                font-size: 15px;
                color: #246537;
                font-weight: bold;
              }
              li:nth-child(2) {
                margin-top: 10px;
                color: #333;
              }
              li:nth-child(3) {
                margin-top: 10px;
                font-size: 12px;
                width: 100%;
                i {
                  float: right;
                  cursor: pointer;
                }
              }
            }
          }
        }
        .zanwu {
          text-align: center;
          line-height: 25px;
          margin-top: 15px;
          color: #666;
          font-size: 14px;
        }
      }
    }
    .middle_layout {
      padding: 35px 100px;
    }
    .mobile_layout {
      padding: 35px 20px;
      .prePage-content {
        position: relative;
        overflow: hidden;
        cursor: pointer;
        ul {
          position: absolute;
          z-index: 99;
          margin-left: 8px !important;
          top: 50%;
          transform: translateY(-50%);
          font-size: 12px;
          li {
            margin: 10px 0;
            color: #fff;
            font-weight: 300;
            letter-spacing: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 170px;
          }
        }
        .preIcon {
          position: absolute;
          z-index: 99;
          width: 50px;
          height: 50px;
          border-radius: 50%;
          text-align: center;
          line-height: 50px;
          right: -5px !important;
          top: 50%;
          transform: translateY(-50%);
          transition: right 0.5s cubic-bezier(0, 0.6, 0.6, 0.99);
          i {
            font-size: 35px !important;
            color: #fff;
          }
        }
        .prePage {
          width: 250px;
          height: 100px;
          background-color: #fff;
          background-image: url("http://localhost:3000/images/fm-02-cate.png");
          background-size: 100% 100%;
          filter: blur(3px) brightness(0.75);
          transform: scale(1.1);
        }
      }
      .dianzan {
        margin: 0 auto;
        text-align: center;
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        background-color: #fff;
        border-radius: 50%;
        cursor: pointer;
        position: fixed;
        top: 150px;
        right: 0px;
        z-index: 999;
        i {
          font-size: 16px !important;
          color: #666;
        }
        .isActive {
          color: #48c2ff;
        }
      }
      .null_box {
        margin: 0 auto;
        text-align: center;
        width: 60px !important;
        height: 60px !important;
        line-height: 60px;
        background-color: #fff;
        border-radius: 50%;
        cursor: pointer;
        visibility: hidden;
      }
      .nextPage-content {
        position: relative;
        overflow: hidden;
        cursor: pointer;
        ul {
          position: absolute;
          z-index: 99;
          // margin-left: 100px;
          top: 50%;
          transform: translateY(-50%);
          // text-align: right;
          width: 180px;
          margin-left: 0px !important;
          font-size: 12px;
          li {
            margin: 10px 0;
            color: #fff;
            font-weight: 300;
            letter-spacing: 1px;
            padding-right: 20px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
        .nextIcon {
          position: absolute;
          z-index: 99;
          width: 50px;
          height: 50px;
          border-radius: 50%;
          text-align: center;
          line-height: 50px;
          left: -5px !important;
          top: 50%;
          transform: translateY(-50%);
          transition: left 0.5s cubic-bezier(0, 0.6, 0.6, 0.99);
          i {
            font-size: 35px !important;
            color: #fff;
          }
        }
        .nextPage {
          width: 250px;
          height: 100px;
          background-image: url("http://localhost:3000/images/fm-03-cate.png");
          background-size: 100% 100%;
          filter: blur(3px) brightness(0.75);
          transform: scale(1.1);
        }
      }
      .statement {
        box-sizing: border-box;
        width: 100%;
        height: 100px;
        margin-top: 30px;
        background-color: #24283b;
        padding: 10px 20px;
        color: #fff;
        border-left: #ff1601da 5px solid;
        ul {
          display: flex;
          height: 100%;
          flex-direction: column;
          justify-content: space-around;
          li {
            font-weight: 200;
            font-size: 12px;
            letter-spacing: 1px;
          }
        }
      }
      .messageBoard {
        .personMessage {
          padding-left: 0;
        }
        .commentArea {
          padding: 0;
        }
      }
    }
  }
  // .middle_layout {
  //   padding: 35px 100px 68px;
  // }
  .el-footer {
    // padding: 10px 250px;
    background-color: #24283b;
    color: #fff;
    border-top: 1px solid #cccccc;
    font-size: 14px;
    font-weight: 200;
    text-align: center;
    .text1 {
      padding-top: 10px;
    }
    .text2 {
      padding-bottom: 10px;
    }
  }
  // .fade-enter-active,
  // .fade-leave-active {
  //   transition: opacity 0.5s;
  // }
  // .fade-enter,
  // .fade-leave-to {
  //   opacity: 0;
  // }
}
</style>
